{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "python函数的定义和调用\n",
    "sigmoid(y=1/(1+e^{-x}))\n",
    "斐波拉契函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7310585786300049\n",
      "<class 'numpy.ndarray'>\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAATpklEQVR4nO3df4xcV3nG8efZtUNDgCaplxZsb21FhmKaH7TbOMiqSEshdvhhKE1J7NCSVliR4goIpAnELUgUtcgt0CoBy44iimLVASVZXGrqplIpEtiVHXbjxaSmSyjOrqniNA2tQoSz8ds/ZjYM69mdM7N35s699/uRLO+de3bmHVl6dPyec+91RAgAUHwDeRcAAMgGgQ4AJUGgA0BJEOgAUBIEOgCUxJK8PnjZsmWxatWqvD4eAArpoYceeiIihpqdyy3QV61apSNHjuT18QBQSLa/P985Wi4AUBIEOgCUBIEOACVBoANASbQMdNt3237c9rfmOW/bf2N70vZR27+SfZkAgFZSdrl8TtIdkj4/z/mNktbU/6yT9Nn63wBQWaNj0/rQ/Uf1zLNnmp4/75xBffztF+ttr1me2We2DPSI+JrtVQsM2STp81G7beMh2+fbfllE/CCrIgEgD9tHJ3TPoRNdee+nTz+nD3zxYUnKLNSz2Ie+XNJjDcdT9dfOCnTbWyVtlaTh4eEMPhoA2tdq9twrz50J7ThwvK8C3U1ea3qT9YjYJWmXJI2MjHAjdgBd0S+BneLkU89k9l5ZBPqUpJUNxysknczgfQFgQdtHJ7Tn0InmM8iCePn552b2XlkE+j5J22zvVW0x9If0zwFkrUiz7lSDA9YtV70ys/drGei2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MpA9ExKskXSHppgp851nvlfRI3kVkiUDv3Kck/bGaPJmpbCLinyJipn54SLUHmJTR88/PjYjTkmafn1taEfGDiPhm/ef/Uy3gSv/QAdsrJL1J0l1515IlAr0Dtt8qaToiHs67lhz8gaSv5F1El8z3bNxKsL1K0msk/VvOpfTCp1WbkJ3JuY5MJd0PvYps/7OkX2hy6nZJH5b0xt5W1F0Lfd+I+FJ9zO2q/Rd9Ty9r66GkZ+OWke0XSbpP0vsi4n/zrqebbL9Z0uMR8ZDtK3MuJ1ME+jwi4reavW77YkmrJT1sW6q1H75p+/KI+K8elpip+b7vLNu/L+nNkl4f5b14oevPxu1HtpeqFuZ7IuL+vOvpgfWS3mr7akk/I+kltu+JiOtzrmvRuLBokWz/p6SRiCjiXduS2N4g6ZOSXhcRp/Kup1tsL1Ft0ff1qj0/97CkzRFxLNfCusi1WcnfSnoyIt6Xczk9V5+hfzAi3pxzKZmgh44Ud0h6saQHbY/b3tnqF4qovvA7+/zcRyR9ocxhXrde0rsk/Wb933a8PnNFATFDB4CSYIYOACVBoANASRDoAFASBDoAlASBDgAlQaADQEkQ6ABQEv8POPnY04zv3XQAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import math\n",
    "import numpy as np\n",
    "def sigmoid(x):\n",
    "    return 1/(1+math.e**(-x))\n",
    "\n",
    "print(sigmoid(1))\n",
    "\n",
    "list_x = []\n",
    "# for i in range(101):\n",
    "#     x = -5 + (10/100)*i\n",
    "#     list_x.append(x)\n",
    "list_y = []\n",
    "list_x = np.linspace(-5, 5, 500)\n",
    "print(type(list_x))\n",
    "list_y = sigmoid(list_x)\n",
    "\n",
    "#for x in np.arange(-5,5,0.01):\n",
    "#for x in list_x:\n",
    "    #list_x.append(x)\n",
    "    #list_y.append(sigmoid(x))\n",
    "# for x in list_x:\n",
    "#     y = sigmoid(x)\n",
    "#     list_y.append(y)\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.plot(list_x, list_y, 'o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[28.74783016 28.97855785 29.21125584 29.44594137 29.68263182]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAbLklEQVR4nO3de5ScdZ3n8fe3qvre6Vw79yvhmgQMkyajICMOIAEZIu5Rg2cQkTWywh45o6uiO7tzHJn1ODq4cxhxwiwr7rBiZoABEZWAjMoKShLuCZeE3DoJ6XRunfS9q777Rz2dFJ3uTrqqnnr6SX1e59Sp5/k99dTzpah8+le/52bujoiIlJdE1AWIiEjpKfxFRMqQwl9EpAwp/EVEypDCX0SkDCn8RUTKUFHC38zuNbMWM3s1p22Cma0xs7eC5/E5y243s01m9oaZXVGMGkRE5OQVq+f/Q2DZgLavAk+5+xnAU8E8ZrYAWAEsDNb5vpkli1SHiIichKKEv7v/Btg/oHk5cF8wfR/wkZz2B9y92923AJuApcWoQ0RETk4qxPee4u67Adx9t5lNDtpnAM/lvK45aDuOma0EVgLU1dUtOfvss0MsV2Tk2jp72ba/g0UzxmJRFyMyiHXr1rW6e+PA9jDDfyiD/RsZ9BoT7r4KWAXQ1NTka9euDbMukRH7xau7ufmf1/PsN6+kMqXjJ2T0MbNtg7WH+W3dY2bTgo1PA1qC9mZgVs7rZgK7QqxDREQGCDP8HwVuCKZvAB7JaV9hZlVmNg84A/hDiHWIhM4H//EqMmoVZdjHzH4MXAJMMrNm4L8D3wJWm9lNwHbgYwDu/pqZrQY2AH3ALe6eL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IiJlSOEvIlKG/j8WoJ4IQ+4WmQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#函数eˣ/x怎么绘制 https://www.zhihu.com/question/574805773 \n",
    "import math\n",
    "import numpy as np\n",
    "def sigmoid(x):\n",
    "    return 1/(1+math.e**(-x))\n",
    "\n",
    "def f(x):\n",
    "    return math.e**(x)/x\n",
    "\n",
    "list_x = []\n",
    "list_y = []\n",
    "list_x = np.linspace(-5, 5, 1000)\n",
    "list_y = f(list_x)\n",
    "\n",
    "print(list_y[-5:])\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 设置x轴的取值范围为：-5到5\n",
    "plt.xlim(-5, 5)\n",
    "# 设置y轴的取值范围为：-100到100\n",
    "plt.ylim(-100,100)\n",
    "\n",
    "plt.plot(list_x, list_y, linewidth=1.0, linestyle='-')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "fibonacci函数\n",
    "f(1)=1,f(2)=1,f(3)=f(1)+f(2)=2\n",
    "f(4)=f(2)+f(3)=3\n",
    "f(x) = f(x-1)+f(x-2)\n",
    "1,1,2,3,5,8,13,21"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1, 1, 2, 3, 5, 8, 13, 21, 34, 55]\n",
      "55\n"
     ]
    }
   ],
   "source": [
    "# def fibonacci(x):\n",
    "#     if(x 2<=):\n",
    "#         return 1\n",
    "#     return fibonacci(x-1) + fibonacci(x-2)\n",
    "\n",
    "# print(fibonacci(10))\n",
    "result = [1, 1]\n",
    "for i in range(3,11):\n",
    "    f_i = result[-1]+result[-2]\n",
    "    result.append(f_i)\n",
    "print(result)\n",
    "\n",
    "\n",
    "def fibonacci(x):\n",
    "    if(x <=2):\n",
    "        return 1\n",
    "    return fibonacci(x-1) + fibonacci(x-2)\n",
    "\n",
    "print(fibonacci(10))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.9.12 ('base')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "ad2bdc8ecc057115af97d19610ffacc2b4e99fae6737bb82f5d7fb13d2f2c186"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
